#ifndef         _VRLINE_
#define         _VRLINE_



typedef struct vrLine_type 
{
	vec2f_type	n;
	vec2f_type  p;
	float degree;
	int index;

}vrLine_type;





// functions Voronoi


	// VrLine.cpp
void vrLine_compute( vrLine_type *vl, vec2f_type *p0, vec2f_type *p);

int vrLine_SharePoint( vrLine_type *vl0, vrLine_type *vl1, vec2f_type *p );

float vrLine_Point_distnace( vrLine_type *vl, vec2f_type *p );

int	line_cut_point( vec2f_type *p0, vec2f_type *n0, vec2f_type *p1, vec2f_type *n1,  vec2f_type *p );

int vrLine_side( vrLine_type *vl, vec2f_type *v );



typedef struct vrCell_type
{
	int	index;
	vec2f_type	p;
	int n;
	vrLine_type	vl[100];

}vrCell_type;



	// VrCell.cpp
void vrCell_line( pt2dA_type *apt, int i0,vrCell_type *vc );

void vrCell_order( vrCell_type *vc );

int vrCell_filter( vrCell_type *vc, int i0);

pt2dA_type* vrCell_to_apt( vrCell_type *vc );

void vrCell_write( vrCell_type *vc, char *file  );

void vrCell_create( pt2dA_type *apt, int i0, vrCell_type *vc );





#endif 